package com.xiaozhen.device.service;

import com.xiaozhen.common.core.domain.device.DeviceCategory;

import java.util.List;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/11/1 11:30
 * @description:
 */
public interface DeviceCategoryService {

    /**
     * 获取设备分类列表
     * @param deviceCategory
     * @return
     */
    List<DeviceCategory> selectDeviceCategoryList(DeviceCategory deviceCategory);

    /**
     * 检测设备分类名称是否存在
     * @param deviceCategory
     * @return
     */
    Boolean checkDeviceCategoryNameUnique(DeviceCategory deviceCategory);

    /**
     * 添加设备分类
     * @param deviceCategory
     * @return
     */
    Integer insertDeviceCategory(DeviceCategory deviceCategory);

    /**
     * 更改设备分类
     * @param deviceCategory
     * @return
     */
    Integer updateDeviceCategory(DeviceCategory deviceCategory);

    /**
     * 是否存在子级分类
     * @param deviceCategoryId
     * @return
     */
    Boolean hasChildByDeviceCategoryId(Long deviceCategoryId);

    /**
     * 检查是否存在绑定设备
     * @param deviceCategoryId
     * @return
     */
    Boolean checkDeviceCategoryExistDevice(Long deviceCategoryId);

    /**
     * 删除设备分类
     * @param deviceCategoryId
     * @return
     */
    Integer deleteDeviceCategoryById(Long deviceCategoryId);
}
